package appconfig

import "github.com/spf13/viper"

type Viper struct {
	MysqlConfig struct {
		User string
		Pass string
		Host string
		Port int
		Data string
	}
}

var Conf Viper

func Init() {
	viper.SetConfigFile("./appconfig/config.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic(err)
	}
	err = viper.Unmarshal(&Conf)
	if err != nil {
		panic(err)
	}
}
